<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            width: 100px;
            height: 100px;
            border: 1px solid red;
        }
        div:link {
            color: red;
        }
        div:visited {
            color: red;
        }
        /* :link和:visited伪类只有a标签会触发 */
        div:hover {
            color: green;
        }
        div:active {
            color: yellow;
        }
        span:hover {
            color: red;
        }
        span:active {
            color: blue;
        }
    </style>
</head>
<body>
    <div>hello</div>
    <span>hello</span>
</body>
</html>